package com.weixin.engine.controller;

import com.weixin.common.core.doman.Result;
import com.weixin.engine.feign.BaseFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author wangchunhui
 * @date 2022/10/24 10:57
 */
@Slf4j
@RestController
@RequestMapping("/test")
public class TestLogController {

    @Resource
    private BaseFeignClient baseFeignClient;

    @GetMapping("/log")
    public Result findAll() {
        log.info("测试");
        method1();
        log.info("engine服务的日志");
//        baseFeignClient.findAll();
        return Result.SUCCESS();
    }

    private void method1() {
        log.info("method1");
        method2();
    }

    private void method2() {
        log.info("method2");
    }
}
